package com.cd.javacxy.module.web.service.impl;

import com.cd.javacxy.common.model.entity.CxyBlogCategory;
import com.cd.javacxy.common.model.query.BlogCategoryQuery;
import com.cd.javacxy.module.web.dao.CxyBlogCategoryDao;
import com.cd.javacxy.module.web.service.CxyBlogCategoryService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * CxyBlogCategory的服务接口的实现类
 *
 * @author yanghy
 */
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class CxyBlogCategoryServiceImpl implements CxyBlogCategoryService {

    private final CxyBlogCategoryDao cxyBlogCategoryDao;

    @Override
    public List<CxyBlogCategory> findBlogCategoryList(Integer userId){
        BlogCategoryQuery blogCategoryQuery = new BlogCategoryQuery();
        blogCategoryQuery.setUserId(userId);
        List<CxyBlogCategory> list = this.cxyBlogCategoryDao.selectList(blogCategoryQuery);
        return list;
    }
}